package com.qf.pickname.spring.boot.autoconfigure;

import com.qf.pickname.spring.boot.autoconfigure.properties.PicknameProperties;
import com.qf.pickname.spring.boot.autoconfigure.util.PicknameOOP;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 我们自定义的starter的配置类
 */
@Configuration
@EnableConfigurationProperties(PicknameProperties.class)
public class PicknameAutoConfigure {

    @Autowired
    PicknameProperties picknameProperties;
    @Bean
    public PicknameOOP picknameOOP(){
        PicknameOOP picknameOOP = new PicknameOOP(picknameProperties.getFile1());
        return picknameOOP;
    }
}
